.data
var:
.space 16
.text
addi $9, $0, 20
addi $3, $0, 0
addi $6, $0, 0
addi $7, $0, 1
loop:
     beq $9, $3, fim
     addi $2, $0, 1
     addi $4, $7, 0
     syscall
     addi $8, $7, 0
     add $7, $7, $6
     addi $6, $8, 0
     addi $3, $3, 1
     j loop
fim: 
     addi $4, $7, 0
     syscall
